
buildDir=$(pwd)/../build
binDir=$(pwd)/../bin

if [ ! -d $buildDir ];
  then
    cd ..
    mkdir -p $buildDir
fi

if [ $1 = "clean" ]; then
  rm -rf $buildDir/*
  rm -rf $binDir/*
fi

cd $buildDir
cmake ..
make -j8
